home *** CD-ROM | disk | FTP | other *** search
- #if defined (DOS)
- #include <conio.h>
- #endif
-
- #define CURSES_LIBRARY 1
- #define NEEDS_OS2 1
- #include <curses.h>
-
- #ifdef PDCDEBUG
- char *rcsid__ckbiosk = "$Header: C:\CURSES\private\RCS\_ckbiosk.c 2.1 1993/06/18 20:22:32 MH Rel MH $";
- #endif
-
-
-
-
- /*man-start*********************************************************************
-
- PDC_check_bios_key() - Check BIOS key data area for input
-
- PDCurses Description:
- This is a private PDCurses routine.
-
- This routine will check the BIOS for any indication that
- keystrokes are pending.
-
- PDCurses Return Value:
- Returns 1 if a keyboard character is available, 0 otherwise.
-
- PDCurses Errors:
- No errors are defined for this function.
-
- Portability:
- PDCurses bool PDC_check_bios_key( void );
-
- **man-end**********************************************************************/
-
- bool PDC_check_bios_key(void)
- {
- #ifdef OS2
- #if !defined(MSC)
- KBDKEYINFO keyInfo;
- #endif
- #endif
-
- #ifdef PDCDEBUG
- if (trace_on) PDC_debug("PDC_check_bios_key() - called\n");
- #endif
-
- #ifdef FLEXOS
- retcode = s_get(T_VIRCON, 0L, (char *) &vir, (long) sizeof(vir));
- return( (retcode < 0L) ? ERR : vir.vc_tahead );
- #endif
-
- #if defined (DOS)
- return(kbhit());
- #endif
-
- #ifdef OS2
- #if !defined(MSC)
- /* KbdCharIn(&keyInfo, IO_NOWAIT, 0);*/ /* get a character */
- KbdPeek(&keyInfo, 0); /* peek at keyboard */
- return (keyInfo.fbStatus != 0);
- #else
- return(kbhit());
- #endif
- #endif
-
- #ifdef UNIX
- return(PDC_kbhit());
- #endif
- }
-